from template import *

class TestAuthorizePlugin(TemplateAuthorizePlugin):
    """this is just here for test cases"""
    
    def authorize(self, servicename, username, rolename):
        response = False
        svc_dict = {'test_service' : 'test_role'}
        user_dict = {'test_user' : 'test_role'}
        valid_svc = svc_dict.get(servicename)
        valid_user = user_dict.get(username)
        if (valid_user == rolename) and (valid_svc == rolename):
            response = True
        return response
    
